<script>
export default {
  name: "keyBoardModifiers",
  data() {
    return {
      val: ''
    }
  },
  methods: {
    modified(event) {
      console.log('修饰符')
      console.log(event)
    }
  }
}
</script>

<template>
  <div>
    <!--  键盘修饰符  @keyup.按键码  @keyup.键盘别名 -->
    <input type="text" v-model="val" @keyup="modified">
    <!--  回车  -->
    <input type="text" v-model="val" @keyup.13="modified">
    <!--  a-->
    <input type="text" v-model="val" @keyup.65="modified">
    <!--  回车  -->
    <input type="text" v-model="val" @keyup.enter="modified">
    <input type="text" v-model="val" @keyup.f5="modified">
    <input type="text" v-model="val" @keyup.f1="modified">
  </div>
</template>

<style scoped lang="less">

</style>